package com.linhh.mall.center.server.service;

import com.linhh.mall.center.api.TbLandRegistrationService;
import com.linhh.mall.center.common.pojo.TbLandRegistration;
import com.linhh.mall.center.server.mappers.TbLandRegistrationMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 *
 * @Author linhh
 * @Date 2023 03 20 12 03
 **/
@Service
public class TbLandRegistrationServiceImpl implements TbLandRegistrationService {

    @Autowired
    private TbLandRegistrationMapper tbLandRegistrationMapper;

    @Override
    public List<TbLandRegistration> selectAll() {
        return tbLandRegistrationMapper.selectAll();
    }

    @Override
    public int addTbLandRegistration(TbLandRegistration tbLandRegistration) {
        tbLandRegistrationMapper.insertSelective(tbLandRegistration);
        return 1;
    }

    @Override
    public int deleteTbLandRegistration(Long id) {
        tbLandRegistrationMapper.deleteByPrimaryKey(id);
        return 1;
    }

    @Override
    public int updateTbLandRegistration(TbLandRegistration tbLandRegistration) {
        tbLandRegistrationMapper.updateByPrimaryKeySelective(tbLandRegistration);
        return 1;
    }

    @Override
    public TbLandRegistration findByViolator(String violator) {
        return null;
    }

    @Override
    public TbLandRegistration selectRegistrationById(Long id) {
        return tbLandRegistrationMapper.selectByPrimaryKey(id);
    }


}
